<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core">
	<head><title>IGNORED</title></head>
    <body>
		<ui:composition template="templates/layout.xhtml">
			<ui:define name="windowTitle">Daily Market | Change Password</ui:define>
			<ui:define name="logoImage"><h:graphicImage library="images" name="logo_header.jpg" alt="logo" /></ui:define>
			<ui:define name="navigation"></ui:define>
			<ui:define name="content">
				<div id="content" class="graphic_bg">
					<h:form>
						<div class="form-row header">Change Password</div>
						<div class="form-row">
							<h:outputLabel for="old_password" value="#{msgs.change_password_old}" styleClass="form-row" />
							<h:inputSecret id="old_password" value="#{changePasswordBean.oldPassword}" required="true" requiredMessage="Please enter your old password." />
							<h:message for="old_password" styleClass="form-messages" fatalClass="form-messages error" errorClass="form-messages error" warnClass="form-messages warn" infoClass="form-messages good" />
						</div>
						<div class="form-row">
							<h:outputLabel for="new_password" value="#{msgs.change_password_new}" styleClass="form-row" />
							<h:inputSecret id="new_password" value="#{changePasswordBean.newPassword}" validatorMessage="#{msgs.change_password_invalid}">
								<f:validateLength minimum="6" maximum="20" />
							</h:inputSecret>
							<h:message for="new_password" styleClass="form-messages" fatalClass="form-messages error" errorClass="form-messages error" warnClass="form-messages warn" infoClass="form-messages good" />
						</div>
						<div class="form-row">
							<h:outputLabel for="new_password_confirm" value="#{msgs.change_password_new_confirm}" styleClass="form-row" />
							<h:inputSecret id="new_password_confirm" value="#{changePasswordBean.newPasswordConfirm}" />
							<h:message for="new_password_confirm" styleClass="form-messages" fatalClass="form-messages error" errorClass="form-messages error" warnClass="form-messages warn" infoClass="form-messages good" />
						</div>
						<div class="form-row submit">
							<h:link styleClass="image-button no-height" outcome="cancel"><h:graphicImage library="images/icons/16" name="cancel.png" alt="c" title="Cancel" styleClass="with-text" />Cancel</h:link>
							<h:commandLink styleClass="image-button no-height" action="#{changePasswordBean.doChangePassword}"><h:graphicImage library="images/icons/16" name="key.png" alt="c" title="Change" styleClass="with-text" />Change</h:commandLink>
						</div>
						<h:messages globalOnly="true" styleClass="form-messages" fatalClass="form-messages error" errorClass="form-messages error" warnClass="form-messages warn" infoClass="form-messages good" />
					</h:form>
				</div>
			</ui:define>
		</ui:composition>
	</body>
</html>
